package com.lanou.springbootoracle;

import org.junit.jupiter.api.Test;
import redis.clients.jedis.Jedis;


public class RedisConnection {

    @Test
    public void connect(){
        Jedis jedis = new Jedis("127.0.0.1",6379);
        jedis.auth("123456");
        System.out.println(jedis.ping());

        jedis.set("food","酸菜鱼");
        System.out.println(jedis.get("food"));
        System.out.println(jedis.exists("food"));
        jedis.del("food");
        System.out.println(jedis.exists("food"));
    }
}
